package cn.lili.modules.goods.fallback;

import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.goods.client.GoodsIndexClient;
import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.search.entity.dos.EsGoodsIndex;
import cn.lili.modules.search.entity.dto.EsDeleteDTO;
import cn.lili.modules.search.entity.dto.EsGoodsIndexDTO;
import cn.lili.modules.search.entity.dto.EsGoodsIndexUpdateDTO;
import cn.lili.modules.search.entity.dto.EsGoodsIndexUpdatePromotionsDTO;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author paulG
 * @since 2022/6/20
 **/
public class GoodsIndexFallback implements GoodsIndexClient {

    @Override
    public List<EsGoodsIndex> getEsGoodsBySkuIds(List<String> skuIds) {
        throw new ServiceException();
    }

    /**
     * 清除商品索引中无效促销活动
     */
    @Override
    public void cleanEsGoodsIndexInvalidPromotions() {
        throw new ServiceException();
    }

    @Override
    public void updateIndexField(EsGoodsIndexUpdateDTO esGoodsIndexUpdateDTO) {
        throw new ServiceException();
    }

    @Override
    public void updateEsGoodsIndexByList(EsGoodsIndexUpdatePromotionsDTO esGoodsIndexUpdatePromotionsDTO) {
        throw new ServiceException();
    }

    @Override
    public void updateEsGoodsIndexPromotions(EsGoodsIndexUpdatePromotionsDTO esGoodsIndexUpdatePromotionsDTO) {
        throw new ServiceException();
    }

    @Override
    public void updateEsGoodsIndexAllByList(EsGoodsIndexUpdatePromotionsDTO esGoodsIndexUpdatePromotionsDTO) {
        throw new ServiceException();
    }

    @Override
    public void addIndex(EsGoodsIndex goodsIndex) {
        throw new ServiceException();
    }

    @Override
    public void addIndex(List<EsGoodsIndex> goodsIndexDTOList) {
        throw new ServiceException();
    }

    @Override
    public void deleteIndex(EsDeleteDTO esDeleteDTO) {
        throw new ServiceException();
    }

    @Override
    public void updateIndex(EsGoodsIndexDTO goodsIndex) {
        throw new ServiceException();
    }

    public void updateGoodsIndexByGoodsList(List<Goods> goodsList) {
        throw new ServiceException(ResultCode.ERROR);
    }

    @Override
    public void updateGoodsIndexByStore(String storeId) {
        throw new ServiceException(ResultCode.ERROR);
    }

    @Override
    public void updateBulkIndex(List<EsGoodsIndex> goodsIndices) {
        throw new ServiceException();
    }

    @Override
    public EsGoodsIndex findById(String id) {
        throw new ServiceException();
    }

    @Override
    public EsGoodsIndex getEsGoodsBySkuId(String skuId) {
        throw new ServiceException();
    }

    @Override
    public void deleteEsGoodsPromotionByPromotionKey(List<String> skuIds, String promotionsKey) {
        throw new ServiceException();
    }

    @Override
    public void deleteEsGoodsPromotionByPromotionKey(String promotionsKey) {
        throw new ServiceException();
    }
}
